package code.xiaohh.cloudalibaba.payment.service.impl;

import code.xiaohh.cloudalibaba.common.entities.payment.PaymentEntity;
import code.xiaohh.cloudalibaba.common.utils.PageUtils;
import code.xiaohh.cloudalibaba.common.utils.Query;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.Map;

import code.xiaohh.cloudalibaba.payment.dao.PaymentDao;
import code.xiaohh.cloudalibaba.payment.service.PaymentService;


@Service("paymentService")
public class PaymentServiceImpl extends ServiceImpl<PaymentDao, PaymentEntity> implements PaymentService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<PaymentEntity> page = this.page(
                new Query<PaymentEntity>().getPage(params),
                new QueryWrapper<PaymentEntity>()
        );

        return new PageUtils(page);
    }

}